//
//  SEGInviteRecordViewModel.m
//  SEGViewModel
//
//  Created by 山刘 on 2020/6/1.
//

#import "SEGInviteRecordViewModel.h"

@implementation SEGInviteRecordViewModel
#pragma mark - business
-(void)requesthareRecordListWithPageNo:(NSString *)pageNo
                             completed:(void(^)(NSString*codeType,NSString* errorMessage))completed{
    [self.inviteManager requesthareRecordListWithPageNo:pageNo pageSize:@"20" finished:^(BOOL isSuccessed,id result,NSString* codeType,NSString* errorMessage) {
        if ([codeType isEqualToString:@"0"]) {
            self.recordModel = self.inviteManager.recordModel;
            [self.recordsArr addObjectsFromArray:self.recordModel.records];
        }
        completed(codeType,errorMessage);
    }];
}
#pragma mark - getter
- (SEGInviteManager *)inviteManager
{
    if (!_inviteManager) {
        _inviteManager = [[SEGInviteManager alloc] init];
    }
    return _inviteManager;
}

@end
